/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.tenant.controller.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.utils.CopyUtil;
import net.siufung.market.base.tenant.mapper.entity.TenantType;

import java.io.Serializable;

/**
 * <p>
 * 系统租户类型表 默认数据传参对象
 * </p>
 * @author 陈建峰
 * @since 2022-07-06 14:45:08
 */
@Slf4j
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TenantTypeDto", description="系统租户类型表默认数据传输对象")
public class TenantTypeDto implements Serializable {

    private static final long serialVersionUID = -2521374155737097495L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    /**
     * 类型名称
     */
    @ApiModelProperty(value = "类型名称")
    private String name;

    /**
     * 类型编码
     */
    @ApiModelProperty(value = "类型编码")
    private String code;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 数据标识
     */
    @ApiModelProperty(value = "数据标识")
    private Boolean deleted;


    /**
     * 转化成数据库实体
     * @return TenantType
     */
    public TenantType to(){
        TenantType tenantType = new TenantType();
        CopyUtil.copyProperties(this, tenantType);
        return tenantType;
    }
}